package com.level.system.exception;

public class HISUploadDataExecption extends RuntimeException{
    private static final long serialVersionUID = 4453214753962022203L;
    private Integer code;
    private String msg;

    public HISUploadDataExecption() {}

    public HISUploadDataExecption(int code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public HISUploadDataExecption(String msg) {
        super(msg);
        this.msg = msg;
    }

    public HISUploadDataExecption(String msg, Throwable cause) {
        super(msg, cause);
        this.msg = msg;
    }

    public HISUploadDataExecption(Integer code, String msg, Throwable cause) {
        super(msg, cause);
        this.code = code;
        this.msg = msg;
    }

    public static HISUploadDataExecption paramException(String message) {
        HISUploadDataExecption baseExecption = new HISUploadDataExecption(400, message);
        return baseExecption;
    }

    public static HISUploadDataExecption serverErrException(String message) {
        return new HISUploadDataExecption(500, message);
    }

    public static HISUploadDataExecption serverErrException(String message, Exception e) {
        return new HISUploadDataExecption(500, message, e);
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
